package com.xxg.socket.impl.test;
/*
 * @author uv
 * @date 2018/10/12 20:54
 *
 */
import com.xxg.socket.impl.NettySocketClient;

public class Client extends NettySocketClient {

    @Override
    public Object onMessage(Object message) {
        String res = new String((byte[]) message);
        System.out.println(res);
        int req = Integer.parseInt(res) + 1;
        send(String.valueOf(req).getBytes());
        return null;
    }

    public static void main(String[] args) {
        Client client = new Client();
        client.connect();
    }
}
